-module(server).
-compile(export_all).


start_server() ->
    spawn(fun() -> server_loop(dict:new()) end).
    
server_loop(Hash_table) ->
    receive 
        {get,Key} ->
	        io:fwrite("get!"),
            case dict:find(Key,Hash_table) of
               {K,V} -> io:fwrite("get!" ++ V);
               error -> io:fwrite("feel!\n")
                        ,error
            end,
			server_loop(Hash_table);
        {put,{Key,Value}} ->
	        io:fwrite("put!" ++ Value),
            server_loop(dict:store(Key,Value,Hash_table))
    end.



    
    
    